#ifndef _HARD_WIRE_H_
#define _HARD_WIRE_H_

#include <sc.h>


#define BSP_MCU_MODEL   POLSYS_MCU_SC8


#define GPIO_INIT   \
{\
    /*默认输出电平*/\
    PORTA = 0XF8;   /*1111 1000*/\
    PORTB = 0XFF;   /*1111 1111*/\
    /*方向，1:输入，0：输出*/\
    TRISA = 0XF8;   /*1111 1000*/\
    TRISB = 0XFC;   /*1111 1100*/\
    /*模拟引脚初始状态,1:模拟，0：数字(默认)*/\
    /*ANSEL = 0X00;*/   /*0000 0000 CH7~0*/\
    /*ANSELH = 0X08;*/  /*0000 1000 CH15~8*/\
    /*上拉，1：开启，0：关闭(默认)*/\
    WPUA = 0X20;    /*0010 0000*/\
    /*WPUB = 0X00;*/    /*0000 0000*/\
    /*下拉，1：开启，0：关闭（默认）*/\
    /*WPDA = 0X00;*/    /*0000 0000*/\
    WPDB = 0X04;    /*0000 0100*/\
    /*电平变化中断，1：允许，0：禁止*/\
    IOCA = 0X20;    /*0010 0000*/\
    IOCB = 0X0C;    /*0000 1100*/\
}


#define OVAL                RB3
#define OVAL_ANALOG_MODE    ANSEL11 = 1
#define OVAL_DIGIT_MODE     ANSEL11 = 0
#define OVAL_INPUT_MODE     TRISB3 = 1
#define OVAL_OUTPUT_MODE    TRISB3 = 0



#endif
